package com.shop.cloud.domain.hongfu;

import java.sql.Timestamp;
import java.util.Date;
import java.math.BigDecimal;

import org.apache.commons.lang3.builder.ToStringBuilder;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.shop.cloud.common.mybatis.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 
 * code-code
 *
 */
@ToString
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class Code extends BaseEntity{

	private static final long serialVersionUID = 1L;
	
	public static final int TYPE_REGISTER = 1; // 1:注册
	public static final int TYPE_BIND_PHONE = 2; // 2:绑定手机
	public static final int TYPE_RETRIEVE_PASSWORD = 3; // 3:找回密码
	public static final int TYPE_CHANGE_PASSWORD = 4; // 4:修改密码
	
	public static final int STATUS_NOT_USE = 1; //1：未使用过
	public static final int STATUS_USED = 2; //2：已使用过
	public static final int STATUS_EXPIRED = 3; //3：已过期
    
	/**
	 * 类型
1：注册验证码
2：找回密码验证码
	 */
	@ApiModelProperty(value = "类型,1:注册,2:绑定手机,3:找回密码,4:修改密码")
	 private Integer type;
	/**
	 * 手机号码
	 */
	@ApiModelProperty(value = "手机号码")
	 private String phone;
	/**
	 * 验证码
	 */
	@ApiModelProperty(value = "验证码")
	 private String code;
	/**
	 * 令牌
	 */
	@ApiModelProperty(value = "令牌")
	 private String token;
	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	private Timestamp createTime;
	/**
	 * 过期时间
	 */
	@ApiModelProperty(value = "过期时间")
	private Timestamp expireTime;
	/**
	 * 状态
1：未使用过
2：已使用过
3：已过期
	 */
	@ApiModelProperty(value = "状态1：未使用过2：已使用过3：已过期")
	 private Integer status;
    
    public Code(){
    
    }
    
    public Integer getType() {
        return this.type;
    }
    
    public void setType(Integer type) {
        this.type = type;
    }
    public String getPhone() {
        return this.phone;
    }
    
    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getCode() {
        return this.code;
    }
    
    public void setCode(String code) {
        this.code = code;
    }
    public String getToken() {
        return this.token;
    }
    
    public void setToken(String token) {
        this.token = token;
    }
    public Timestamp getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
    public Timestamp getExpireTime() {
        return this.expireTime;
    }
    
    public void setExpireTime(Timestamp expireTime) {
        this.expireTime = expireTime;
    }
    public Integer getStatus() {
        return this.status;
    }
    
    public void setStatus(Integer status) {
        this.status = status;
    }

}